var config = (function ($) {
    $.urlConfig = {
        contextPath: cusstr(window.location.href, "/", 3) + "/imk",
        url: "https://gitee.com/dqp2375/imk"
        // url:"http://127.0.0.1:8888"
    }
    return $;
})(window.config || {});

function cusstr(str, findStr, num) {
    var idx = str.indexOf(findStr);
    var count = 1;
    while (idx >= 0 && count < num) {
        idx = str.indexOf(findStr, idx + 1);
        count++;
    }
    if (idx < 0) {
        return '';
    }
    return str.substring(0, idx);
}